{% extends 'base_menu.html' %}
{% block content %}
<div class="container">
    <h1>欢迎来到隧道监测系统</h1>
    
    <!-- 主要内容区域 -->
    <div class="main-content">
        <!-- 可以添加更多内容 -->
    </div>
    
    <!-- 底部信息区域 -->
    <div class="footer-info">
        <div class="row">
            <div class="col-md-4">
                <h3>系统公告</h3>
                <ul class="list-group">
                    {% for announcement in announcements %}
                    <li class="list-group-item">{{ announcement.title }} - {{ announcement.created_at|date:"Y-m-d" }}</li>
                    {% endfor %}
                </ul>
            </div>
            <div class="col-md-4">
                <h3>在线用户</h3>
                <p>当前在线用户数: {{ online_users }}</p>
            </div>
            <div class="col-md-4">
                <h3>网关信息</h3>
                <ul class="list-group">
                    {% for gateway in gateways %}
                    <li class="list-group-item">{{ gateway.name }} - {{ gateway.status }}</li>
                    {% endfor %}
                </ul>
                <div class="dashboard-link" style="position: absolute; bottom: 20px; right: 20px;">
                    <a href="{% url 'dashboard' %}" class="btn btn-primary">Dashboard</a>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}